package edu.washington.ling.syntric.io;

import java.io.IOException;

public abstract class ExampleDocReader {
	private String path;
	
	protected ExampleDocReader(String path) {
		this.path = path;
	}
	public static ExampleDocReader newReader(String path, String format) {
		ExampleDocReader exfr;
		if (format.equals("sgml"))
			exfr = new ExampleDocReaderSGML(path);
		else if (format.equals("xml"))
			exfr = new ExampleDocReaderXML(path);
		else
			exfr = null;
		return exfr;
	}
	public String getPath() {
		return path;
	}
	public abstract ExampleDoc read() throws IOException;
}
